/**
 * 判断是否输入购买数量
 */
function shoppingNumber() {
    var snumber = $("#snumber").val();
    var ze = /[0-9]/;
    if (!ze.test(snumber)) {
        alert("购买数量不能为空！");
        $("#saveShopping1").attr("disabled", true);
        $("#saveShopping2").attr("disabled", true);
        return;
    }
    $("#saveShopping1").attr("disabled", false);
    $("#saveShopping2").attr("disabled", false);
}

/**
 * 添加购物车和购买事件
 */
function saveShopping1() {
    shoppingNumber();

}

function saveShopping2() {
    shoppingNumber();

}